
#ifndef EffectAnnotationCollection_h
#define EffectAnnotationCollection_h

#include <System/Collections/Generic/List.h>
#include <System/Collections/Generic/IEnumerable.h>
#include <System/Array.h>
#include <System/ArgumentNullException.h>

#include "../Effect/EffectParameterClass.h"
#include "EffectAnnotation.h"

namespace Riccsson
{
	namespace Xna
	{
		namespace Framework
		{
			namespace Graphics
			{
				class EffectAnnotationCollection
					: public Riccsson::System::Collections::Generic::IEnumerable<EffectAnnotation>
				{
					GC_PTR<Riccsson::System::Collections::Generic::List<GC_PTR<EffectAnnotation>>> _annotations;

					EffectAnnotationCollection()
						: _annotations(new Riccsson::System::Collections::Generic::List<GC_PTR<EffectAnnotation>>())
					{
					}
		
					public: PROP3_GET(int, Count)
					{
						return _annotations->Count;
					}
					public: PROP3_SET(int, Count){throw;}
		
					public: GC_PTR<EffectAnnotation> operator[](int index)
					{
						return _annotations->at(index);
					}
		
					public: GC_PTR<EffectAnnotation> operator[](Riccsson::System::string* name)
					{
						//foreach (var annotation : *_annotations.get()) 
						//{
						//	if (annotation->Name == name)
						//		return annotation;
						//}
						//return null;
						throw;
					}
		
					//public: IEnumerator<EffectAnnotation> GetEnumerator()
					//{
					//	return _annotations->GetEnumerator();
					//}

					//System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
					//{
					//	return _annotations.GetEnumerator();
					//}

					public: /*internal*/ void Add(GC_PTR<EffectAnnotation> annotation)
					{
						_annotations->Add(annotation);
					}
				};
			}
		}
	}
}

#endif
